<h1>Phiếu giảm giá</h1>
<div class="actions">
    <?php
    echo CHtml::link(ProductModule::t('Create a new coupon'), array('coupon/create'), array('class' => 'btn btn-small btn-success'));
    ?>
</div>

<?php
$this->widget('bootstrap.widgets.TbGridView', array(
    'dataProvider' => $dataProvider,
    'type' => 'striped bordered condensed',
    'columns' => array(
        array('name' => 'coupon_id', 'value' => '$data->coupon_id', 'type' => 'number'),
        array('name' => 'code', 'value' => '$data->code'),
        array('name' => 'value', 'value' => 'Yii::app()->numberFormatter->formatCurrency($data->value, "VND");'),
        array('name' => 'from_date', 'value' => 'Yii::app()->dateFormatter->format("d/M/y",$data->from_date)'),
        array('name' => 'to_date', 'value' => 'Yii::app()->dateFormatter->format("d/M/y",$data->to_date)'),
        array('name' => 'is_used', 'value' => '($data->isUsed())?"Đã sửa dụng":"Chưa sử dụng"'),
    ),
));